<script type="text/template" id="app-entry">
      <section>
        <el-menu
      :default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#000"
      text-color="#fff"
      active-text-color="#ffd04b">
      <img style="float:left;width:160px;" src="./images/logo.png">

      <component :index="''+outerIndex" :key="item.name" v-for="(item,outerIndex) in menuRes"
       :is="(item.children||[]).length!=0?'el-submenu':'el-menu-item'">
        <span v-if="(item.children||[]).length==0">{{item.name}}</span>
        <template v-else slot="title">{{item.name}}</template>
        <el-menu-item v-for="(child,innerIndex) in item.children"
        :key="item.name+'-'+child.name"
        :index="''+outerIndex+'-'+innerIndex">{{child.name}}</el-menu-item>
      </component>
      <!-- <el-menu-item index="1">处理中心</el-menu-item> -->
      <!-- <el-submenu index="2">
        <template slot="title">我的工作台</template>
        <el-menu-item index="2-1">选项1</el-menu-item>
        <el-menu-item index="2-2">选项2</el-menu-item>
        <el-menu-item index="2-3">选项3</el-menu-item>
        <el-submenu index="2-4">
          <template slot="title">选项4</template>
          <el-menu-item index="2-4-1">选项1</el-menu-item>
          <el-menu-item index="2-4-2">选项2</el-menu-item>
          <el-menu-item index="2-4-3">选项3</el-menu-item>
        </el-submenu>
      </el-submenu> -->
      <!-- <el-menu-item index="3" disabled>消息中心</el-menu-item> -->
      <!-- <el-menu-item index="4"><a href="https://www.ele.me" target="_blank">订单管理</a></el-menu-item> -->

      <span v-if="!bueStore.userInfo.name">
        <span style="display: inline-block;
        height: 60px;
        line-height: 60px;
        float: right;
        margin-right: 20px;">

  <el-popover
        placement="top-start"
        title="用户登录"
        width="500"
        trigger="click">
        <el-form label-position="top" label-width="80px" :model="regModel">
          <el-form-item label="登录方式">
            <el-radio-group v-model="loginModel.type">
              <el-radio-button label="密码登录"></el-radio-button>
              <el-radio-button label="验证码登录"></el-radio-button>
            </el-radio-group>
          </el-form-item>

          <el-form-item label="手机号">
            <el-input type="number" :style="{width:loginModel.type=='验证码登录'?'355px':'100%'}" v-model.number="loginModel.mobile"></el-input>


            <el-button v-if="loginModel.type=='验证码登录'" :disabled="isRequestCode || (codeTimeoutRemain<codeTimeoutTotal)"
            @click.prevent="getValidateCodeOfRegOrLogin('loginModel')"
            v-text="isRequestCode?'获取中...':(codeTimeoutRemain<codeTimeoutTotal?(codeTimeoutRemain+1+'秒'):'获取验证码')">
          </el-button>
          </el-form-item>
          <el-form-item v-if="loginModel.type=='密码登录'" label="密码">
            <el-input  @keyup.enter.native="callWithLoading(handleLogin,'isLogin')" type="password" v-model="loginModel.password"></el-input>
          </el-form-item>
          <el-form-item v-if="loginModel.type=='验证码登录'" label="验证码">
            <el-input  @keyup.enter.native="callWithLoading(handleLogin,'isLogin')" v-model="loginModel.code"></el-input>
          </el-form-item>
        </el-form>
        <el-button @click="callWithLoading(handleLogin,'isLogin')"
        type="primary" style="display:block;margin:0 auto;">{{isLogin?'登录中...':'登录'}}</el-button>

        <el-button slot="reference" type="text">登录</el-button>
      </el-popover>




          <el-popover
        placement="top-start"
        title="用户注册"
        width="500"
        trigger="click">
        <el-form label-position="top" label-width="80px" :model="regModel">
          <el-form-item label="手机号">
            <el-input type="number" style="width:355px;" v-model.number="regModel.mobile"></el-input>


            <el-button :disabled="isRequestCode || (codeTimeoutRemain<codeTimeoutTotal)"
            @click.prevent="getValidateCodeOfRegOrLogin('regModel')"
            v-text="isRequestCode?'获取中...':(codeTimeoutRemain<codeTimeoutTotal?(codeTimeoutRemain+1+'秒'):'获取验证码')">
          </el-button>
          </el-form-item>
          <el-form-item label="密码">
            <el-input type="password" v-model="regModel.password"></el-input>
          </el-form-item>
          <el-form-item label="验证码">
            <el-input @keyup.enter.native="callWithLoading(handleReg,'isReg')" v-model="regModel.code"></el-input>
          </el-form-item>
        </el-form>
        <el-button @click="callWithLoading(handleReg,'isReg')"
        type="primary" style="display:block;margin:0 auto;">{{isReg?'注册中...':'注册'}}</el-button>

        <el-button slot="reference" type="text">注册</el-button>
      </el-popover>



      </span>
    </span>
      <span v-else style="    display: inline-block;
      float: right;
      height:60px;line-height:60px;
      margin-right: 30px;color:#fff;">
        welcome,

        <el-popover
        placement="bottom"
        title=""
        width="150"
        trigger="hover">
        <el-popconfirm
        @onConfirm="logout"
        title="确定退出登录吗？"
      >
        <el-button style="display:block;margin:0 auto;" slot="reference">退出登录</el-button>
      </el-popconfirm>
          <el-button slot="reference" type="text" v-text="bueStore.userInfo.name"></el-button>
        </el-popover>


      </span>





      <!-- <el-button slot="reference">hover 激活</el-button> -->



    </el-menu>
    <div>
      <el-row>
        <el-col :span="18">
          <iframe @load="handleIframeLoad" ref="iframe" style=" overflow-y:hidden;   width: 100%;
          min-height: 400px;" :src="selectedMenuInfo.url||'./jike_workspace/tools/md5.html'" frameborder="0"></iframe>

        </el-col>
        <el-col :span="6">
          <h3>{{selectedMenuInfo.name}}是什么？</h3>
          <div>
            <iframe
            style="   width: 100%;
          min-height: 400px;"
            v-if="selectedMenuInfo.fundesc_link.startsWith('http')"
            :src="selectedMenuInfo.fundesc_link" frameborder="0"></iframe>
            <div v-else>
              {{selectedMenuInfo.fundesc_str}}
            </div>

          </div>
        </el-col>
      </el-row>

    </div>
    <jk-footer></jk-footer>
      </section>
</script>
